package com.larissa.android.quiz;

public class Question {
    // variables
    private int mQuestionId;
    private boolean mQuestionAnswer;

    // constructors
    public Question(int questionId, boolean questionAnswer){
        mQuestionId=questionId;
        mQuestionAnswer=questionAnswer;
    }

    public Question(){}

    // methods
    public int getQuestionId() {
        return mQuestionId;
    }

    public void setQuestionId(int questionId) {
        mQuestionId = questionId;
    }

    public boolean isQuestionAnswer() {
        return mQuestionAnswer;
    }

    public void setQuestionAnswer(boolean questionAnswer) {
        mQuestionAnswer = questionAnswer;
    }

    @Override
    public boolean equals(Object anObject){
        if(this==anObject) return true;
        else if(anObject instanceof Question){
            Question question=(Question) anObject;
            return (question.getQuestionId()==mQuestionId) && (question.isQuestionAnswer()==mQuestionAnswer);
        }else return false;
    }
}
